<?php

$query = "select CJ.num_Jugador as numero,CJ.nom_Jugador as nombre,CP.nom_Posicion as Posicion,CJ.goles as Goles,CJ.t_Amarillas as TA,CJ.t_Rojas as TR,CE.nom_Estatus as Estatus from Cat_Jugadores as CJ inner join Cat_Posiciones as CP on CJ.id_Posicion=CP.id_Posicion inner join Cat_Estatus as CE on CJ.id_Estatus=CE.id_Estatus Where CJ.id_Estatus=1 order By CP.id_Posicion,CJ.num_Jugador";
$result = mysql_query($query);

while ($row = mysql_fetch_array($result)) {
    echo "<tr><td width=\"5%\"><center><font face=\"verdana\">" .
    $row["numero"] . "</font></center></td>";
    echo "<td><font face=\"verdana\">" .
    $row["nombre"] . "</font></td>";
    echo "<td><font face=\"verdana\">" .
    $row["Posicion"] . "</font></td>";
    echo "<td width=\"5%\"><center><font face=\"verdana\">" .
    $row["Goles"] . "</font></center></td>";
    echo "<td width=\"5%\"><center><font face=\"verdana\">" .
    $row["TA"] . "</font></center></td>";
    echo "<td width=\"5%\"><center><font face=\"verdana\">" .
    $row["TR"] . "</font></center></td>";
}
mysql_free_result($result);
mysql_close($link);
?>
